Proof of concept llvm-toolchain#221
Conversation
| clang_executable = cc_toolchain.compiler_executable | ||
| if hasattr(clang_executable, "dirname"): | ||
| wrapper_bin_dir = clang_executable.dirname | ||
| else: | ||
| wrapper_bin_dir = "/".join(clang_executable.split("/")[:-1]) | ||
| real_llvm_bin_dir = wrapper_bin_dir.replace("llvm_toolchain", "llvm_toolchain_llvm") |
There was a problem hiding this comment.
I dont understand this part yet :)
There was a problem hiding this comment.
No wonder I for sure made this wrong.
My goal was to have the directory containing the LLVM libraries in PATH.
The documentation for the toolchain did not hold my hand at all on how this should be done.
I'm looking at their tests right now to figure out how they did it.
|
Well, I made some adjustments, mainly to how the toolchain is recognized. The new idea is to have an optional parameter where users can provide their llvm_toolchain bin directory as input, and add that to PATH. (This is much better than the one I did before, but it does require more setup from users.) Does this approach seem reasonable? I believe this would also allow users to de-prioritize the LLVM toolchain in the selection order of C++ toolchains(?). What still needs to be done:
|
eeb6015 to
38fe9bc
Compare
|
To make it a bit more serious, I fixed the tests. The highlights:
|
f5e0868 to
427fdec
Compare
427fdec to
02cf60e
Compare
Yes, this might be used. Basically this way we can provide path to particular binaries.
I dont think creating more packages inside packages is a good idea. At least it is highly discouraged in Bazel. |
Well, the recent change made it impossible to review :)
We should definitely avoid packages inside packages.
Yes, I got the idea, Thanks! |
0645e58 to
2f6a06b
Compare
2f6a06b to
7b923c5
Compare
Sorry about that, I reverted those changes
This is the offending line: Not sure what an acceptable way to handle this is. (I did make some miscellaneous changes, compared the issue of transitive dependencies it is not important) |
Why:
We want Bazel to handle all dependencies, including the LLVM toolchain.
What:
Addresses:
none
Note:
Well that broke spectacularly.....
Issues:
"llvm_toolchain_llvm" contains every binary, not just clang. I might be mistaken in how I import the toolchain, but I believe we need this one for sure.